{extend name="template/base" /}
{block name="content"}
    <center>
        <div class="page-container" style="line-height: 50px"  >
            <form id="form1" class="form form-horizontal" action="" method="get">
                <input type="hidden" name="id" value="{$id}">
                <div class="row cl">
                    <label class="form-label col-xs-3 col-sm-3">好评数：</label>
                    <div class="formControls col-xs-6 col-sm-6"  style="margin-top: 12px">
                        <input type="text" autocomplete="off" class="input-text" style="width:250px" placeholder="好评数" name="comment_praise" value="{$vo.comment_praise | default=''}" >
                    </div>
                    <div class="col-xs-3 col-sm-3"></div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-3 col-sm-3">差评数：</label>
                    <div class="formControls col-xs-6 col-sm-6" style="margin-top: 12px">
                        <input type="text" autocomplete="off" class="input-text" style="width:250px" placeholder="差评数" name="comment_negative" value="{$vo.comment_negative | default=''}" >
                    </div>
                    <div class="col-xs-3 col-sm-3"></div>
                </div>
                <!--<input type="hidden" id="status" name="comment_status"  >-->
                <input onclick="click1('/admin/dispatch_traveler_group/comments')" class="btn btn-success radius" style="margin-right: 25px"  type="button" value="点评完成">
            </form>
        </div>
    </center>
{/block}
{block name="script"}
<script type="text/javascript" src="__LIB__/My97DatePicker/WdatePicker.js"></script>
<script>
    function click1(url) {
        $('#status').val(1);
        $.ajax({
            type: 'POST',
            url: url,
            data: $('#form1').serialize(),
            success: function (re){
                layer.msg('评价完成', {
                    time: 1000, //20s后自动关闭
                },function(){
                    parent.location.reload();
                    layer_close();
                });
            },
        });
           /* $.ajax({
                //几个参数需要注意一下
                type: "POST",//方法类型
                dataType: "json",//预期服务器返回的数据类型
                url: "/admin/dispatch_traveler_group/praise" ,//url
                data: $('#form1').serialize(),
                success: function (re){

                },
                error : function() {
                    alert("异常！");
                }
            });*/
    }
    // function click2() {
    //     //var a = document.getElementById('');
    //     $('#status').val(0);
    //     $.ajax({
    //         //几个参数需要注意一下
    //         type: "POST",//方法类型
    //         dataType: "json",//预期服务器返回的数据类型
    //         url: "/admin/dispatch_traveler_group/negative" ,//url
    //         data: $('#form1').serialize(),
    //         success: function (result) {
    //             layer.msg('评价差评', {
    //                 time: 1000, //20s后自动关闭
    //             },function(){
    //                 parent.location.reload();
    //                 layer_close();
    //             });
    //
    //         },
    //         error : function() {
    //             alert("异常！");
    //         }
    //     });
    // }
</script>
{/block}
